<!DOCTYPE html>
<html>
<body>
<input id="c" type="checkbox" aria-label="My Checkbox">
<div id="treeitem" role="treeitem" aria-checked="false">Treeitem</div>
<script>
  function go() {
    document.getElementById('c').checked = true;
    document.getElementById('treeitem').setAttribute('aria-checked', 'true');
  }
</script>
</body>
</html>
